
'
' *  NHibernate 代码模版
' 

Imports System.Collections.Generic

Namespace NCS
	''' <summary>
	'''	
	''' </summary>
	<Serializable()> _
	Public Class muser

		#Region "构造方法"
		Public Sub New()
			m_ID = 0
            m_mname = ""
			m_autoweight = False
            m_mpassword = ""
            m_method = ""

			m_methodid = 0
		End Sub
		#End Region


		#Region "私有变量"
		Private m_ID As Integer
		Private m_mname As String
		Private m_autoweight As Boolean
		Private m_mpassword As String
		Private m_method As String
		Private m_methodid As Integer

		#End Region


		#Region "公有属性"

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property ID() As Integer
			Get
				Return m_ID
			End Get
			Set
				m_ID = value
			End Set
		End Property

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property mname() As String
			Get
				Return m_mname
			End Get
			Set
				m_mname = value
			End Set
		End Property

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property autoweight() As Boolean
			Get
				Return m_autoweight
			End Get
			Set
				m_autoweight = value
			End Set
		End Property

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property mpassword() As String
			Get
				Return m_mpassword
			End Get
			Set
				m_mpassword = value
			End Set
		End Property

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property method() As String
			Get
				Return m_method
			End Get
			Set
				m_method = value
			End Set
		End Property

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property methodid() As Integer
			Get
				Return m_methodid
			End Get
			Set
				m_methodid = value
			End Set
		End Property

		#End Region

		#Region "Rewrite Equals and HashCode"
		''' <summary>
		''' 
		''' </summary>
		Public Overloads Overrides Function Equals(obj As Object) As Boolean
			If Me Is obj Then
				Return True
			End If
			If (obj Is Nothing) OrElse (obj.[GetType]() IsNot [GetType]()) Then
				Return False
			End If
			Dim castObj As muser = DirectCast(obj, muser)
			Return (castObj IsNot Nothing) AndAlso (m_mname = castObj.mname)
		End Function
		''' <summary>
		''' 用唯一值实现GetHashCode
		''' </summary>
		Public Overloads Overrides Function GetHashCode() As Integer
            Dim hash As Integer ' = 57
            Dim tmp As Integer = m_mname.GetHashCode()
            hash = tmp
			Return hash
		End Function
		#End Region
	End Class
End Namespace
